Optimal. Leaf size=84 \[ \frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (a \cos ^2(e+f x)+b\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4133, 288, 321, 205} \[ \frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (a \cos ^2(e+f x)+b\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 288
Rule 321
Rule 4133
Rubi steps
\begin {align*} \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^4}{\left (b+a x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )}-\frac {3 \operatorname {Subst}\left (\int \frac {x^2}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{2 a f}\\ &=-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )}+\frac {(3 b) \operatorname {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{2 a^2 f}\\ &=\frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 3.14, size = 393, normalized size = 4.68 \[ \frac {\sec ^4(e+f x) (a \cos (2 (e+f x))+a+2 b)^2 \left (-\frac {a^2 \tan ^{-1}\left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {a^2 \tan ^{-1}\left (\frac {\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )+\sqrt {a}}{\sqrt {b}}\right )}{b^{3/2}}+\frac {\left (a^2+24 b^2\right ) \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}+\frac {\left (a^2+24 b^2\right ) \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {16 \sqrt {a} \cos (e+f x) (a \cos (2 (e+f x))+a+3 b)}{a \cos (2 (e+f x))+a+2 b}\right )}{64 a^{5/2} f \left (a+b \sec ^2(e+f x)\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.47, size = 201, normalized size = 2.39 \[ \left [-\frac {4 \, a \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 6 \, b \cos \left (f x + e\right )}{4 \, {\left (a^{3} f \cos \left (f x + e\right )^{2} + a^{2} b f\right )}}, -\frac {2 \, a \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) + 3 \, b \cos \left (f x + e\right )}{2 \, {\left (a^{3} f \cos \left (f x + e\right )^{2} + a^{2} b f\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.49, size = 76, normalized size = 0.90 \[ \frac {3 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} f} - \frac {\cos \left (f x + e\right )}{a^{2} f} - \frac {b \cos \left (f x + e\right )}{2 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} a^{2} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 75, normalized size = 0.89 \[ -\frac {b \sec \left (f x +e \right )}{2 f \,a^{2} \left (a +b \left (\sec ^{2}\left (f x +e \right )\right )\right )}-\frac {3 b \arctan \left (\frac {\sec \left (f x +e \right ) b}{\sqrt {a b}}\right )}{2 f \,a^{2} \sqrt {a b}}-\frac {1}{f \,a^{2} \sec \left (f x +e \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 70, normalized size = 0.83 \[ -\frac {\frac {b \cos \left (f x + e\right )}{a^{3} \cos \left (f x + e\right )^{2} + a^{2} b} - \frac {3 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {2 \, \cos \left (f x + e\right )}{a^{2}}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.56, size = 72, normalized size = 0.86 \[ \frac {3\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\cos \left (e+f\,x\right )}{\sqrt {b}}\right )}{2\,a^{5/2}\,f}-\frac {b\,\cos \left (e+f\,x\right )}{2\,f\,\left (a^3\,{\cos \left (e+f\,x\right )}^2+b\,a^2\right )}-\frac {\cos \left (e+f\,x\right )}{a^2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________